﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.ComponentModel;

namespace Chinaer.WCF.Contracts
{
    /// <summary>
    /// 中心公告
    /// </summary>
    public partial interface IChinaer
    {
        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            UriTemplate = "GetAllZhongXinGongGao/{shangJiaID}/{apiToken}")]
        [Description("获取所有的中心公告")]
        List<DTO.ZhongXinGongGaoDTO> GetAllZhongXinGongGao(string shangJiaID,string apiToken);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            UriTemplate = "DeleteZhongXinGongGaoByID/{zhongXinGongGaoID}/{apiToken}")]
        [Description("根据编号删除中心公告信息")]
        Model.Common.JsonResult DeleteZhongXinGongGaoByID(string zhongXinGongGaoID, string apiToken);


        [OperationContract]
        [WebInvoke(ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            UriTemplate = "AddZhongXinGongGao",Method="POST")]
        [Description("添加中心公告")]
        Model.Common.JsonResult AddZhongXinGongGao(DTO.ZhongXinGongGaoDTO zhongXinGongGaoDTO);


        [OperationContract]
        [WebInvoke(ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            UriTemplate = "UpdateZhongXinGongGao", Method = "POST")]
        [Description("更新中心公告")]
        Model.Common.JsonResult UpdateZhongXinGongGao(DTO.ZhongXinGongGaoDTO zhongXinGongGaoDTO);

        [OperationContract]
        [WebInvoke(ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            UriTemplate = "DeleteZhongXinGongGao", Method = "POST")]
        [Description("删除中心公告")]
        Model.Common.JsonResult DeleteZhongXinGongGao(DTO.ZhongXinGongGaoDTO zhongXinGongGaoDTO);
    }
}
